// 获取某月的第一天
export const getFirstDayOfMonth = (date = new Date()) => {
  let year = date.getFullYear();
  let month = date.getMonth();
  return new Date(year, month, 1);
}

// 获取某月的最后一天
export const getLastDayOfMonth = (date = new Date()) => {
  let year = date.getFullYear();
  let month = date.getMonth();
  let nextMonth = ++month;
  let nextMonthFirstDay = new Date(year, nextMonth, 1);
  let lastDay = new Date(nextMonthFirstDay - 1);
  return lastDay;
}